<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>比比旅行</title>
    <script src="${ctxPath}/static/pay/rem.js"></script>
    <link href="${ctxPath}/static/payCss/confirmPayment.css" rel="stylesheet">
</head>
<body class="my">
	<div class="header"> 
          <a class="rers" href=""> <div class="return"> </div></a>确认支付
	</div>
	<div class="box_a">
		<div class="box_a_1">
		<div class="box_a_11"><span class="box_font">订金总额</span></div>
		<div class="box_a_12"><span class="box_subscription">￥${payVo.displayAmount}元</span></div></div>
	</div>
	<!--<div class="box_b"><span class="box_font">选择支付方式</span></div>-->
	<!--<div class="box_c">-->
		<!--<div class="box_c_1"> <div class="box_c_img"><img src="https://hlbibi.oss-cn-shenzhen.aliyuncs.com/pay/weixin.png"></img></div> </div>-->
		<!--<div class="box_c_2">-->
			<!--<div class="box_c_21"><p class="box_c_f">微信支付<span class="box_font_s"></span></p></div>-->
		<!--</div>-->
		<!--<div class="box_c_3">-->
			<!--<input value="1" type="radio" name="radio" class="box_int"></input>-->
			<!--<div class="box_c_not">-->
			<!--</div>-->
		<!--</div>-->
	<!--</div>-->
	<div class="box_d">
		<div class="box_d_1"><span class="box_d_span">确认支付</span></div>
	</div>
    <script src="${ctxPath}/static/lib/jquery-3.3.1.min.js"></script>
	<script>
        var wx5 = /x5app/.test(navigator.userAgent) && !window.MSStream;
        if(!wx5){
            $(".my").css("margin-top","0");
        };
        function onBridgeReady(){
            WeixinJSBridge.invoke(
                'getBrandWCPayRequest', {
                    "appId" : "${orderMap.payParams.appId}",     //公众号名称，由商户传入
                    "timeStamp" : "${orderMap.payParams.timeStamp}",         //时间戳，自1970年以来的秒数
                    "nonceStr" : "${orderMap.payParams.nonceStr}", //随机串
                    "package" : "${orderMap.payParams.package}",
                    "signType" : "${orderMap.payParams.signType}",         //微信签名方式：
                    "paySign" : "${orderMap.payParams.paySign}" //微信签名,paySign 采用统一的微信支付 Sign 签名生成方法，注意这里 appId 也要参与签名，appId 与 config 中传入的 appId 一致，即最后参与签名的参数有appId, timeStamp, nonceStr, package, signType。
                },
                function(res) {
                    if(res.err_msg == "get_brand_wcpay_request:ok" ) {     // 使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回    ok，但并不保证它绝对可靠。
                        alert('支付成功！');
                    } else {
                        alert('支付失败：' + res.err_msg);
                    }
                    WeixinJSBridge.call('closeWindow');
                }
            );
        }
        $(".box_d_1").click(function() {
                if (typeof WeixinJSBridge == "undefined") {
                    if (document.addEventListener) {
                        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
                    } else if (document.attachEvent) {
                        document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
                        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
                    }
                } else {
                    onBridgeReady();
                }
            }
        )
	</script>
 </body>
 </html>